//
//  BiTipsView.m
//  CodoonBikeApp
//
//  Created by ChenBin on 14-4-2.
//  Copyright (c) 2014年 Nahan Cop. All rights reserved.
//

#import "BiTipsView.h"

@interface BiTipsView()
{
    UILabel * _tipsLabel;
}
@end

@implementation BiTipsView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self setBackgroundColor:[UIColor clearColor]];
        [self setClipsToBounds:YES];
        
        UIView *loadingView1 = [[UIView alloc] init];
        [loadingView1 setTag:1002];
        [loadingView1 setAlpha:0.8];
        [loadingView1 setBackgroundColor:[UIColor blackColor]];
        [loadingView1 setFrame:CGRectMake((self.frame.size.width-200)/2, self.frame.size.height-200, 200, 100)];
        loadingView1.layer.masksToBounds=YES;
        loadingView1.layer.cornerRadius = 5;
        loadingView1.clipsToBounds = YES;
        [self addSubview:loadingView1];
        [loadingView1 release];
        
        _tipsLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 180, 100)];
        [_tipsLabel setFont:[UIFont systemFontOfSize:16]];
        [_tipsLabel setTextAlignment:NSTextAlignmentCenter];
        [_tipsLabel setTextColor:[UIColor whiteColor]];
        [_tipsLabel setBackgroundColor:[UIColor clearColor]];
        [loadingView1 addSubview:_tipsLabel];
        [_tipsLabel release];
    }
    return self;
}

- (void)setTipText:(NSString*)tipText
{
    if ([tipText isKindOfClass:[NSString class]])
    {
        _tipsLabel.numberOfLines = 0;
        [_tipsLabel setText:tipText];
    }
}

@end
